import { createApp } from "vue";
import { createPinia } from "pinia";
import App from './App.vue'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

console.log('项目初始文件');

const app = createApp(App)

//1.路由
import router from "./router";
app.use(router)//挂载路由

//2.适配
import 'lib-flexible'

import '@vant/touch-emulator';

//3.vant 所有的样式
import 'vant/lib/index.css'

import { Button, Form, Field, CellGroup, Search, Icon, NavBar, Toast, Tab, Tabs, Swipe, SwipeItem, Image as VanImage, NoticeBar, Grid, GridItem, Tabbar, TabbarItem, ActionSheet, Cell, Dialog, ShareSheet, SubmitBar, Checkbox, CheckboxGroup, Card, ActionBar, ActionBarIcon, ActionBarButton, CouponCell, CouponList, AddressList, AddressEdit, Divider, List, PullRefresh, TreeSelect, DropdownMenu, DropdownItem, BackTop, ImagePreview, Popover, Rate } from 'vant'

app.use(Rate)
app.use(Popover)
app.use(ImagePreview)
app.use(DropdownItem)
app.use(BackTop)
app.use(DropdownMenu)
app.use(CouponCell)
app.use(TreeSelect)
app.use(PullRefresh)
app.use(List)
app.use(Divider)
app.use(AddressEdit)
app.use(AddressList)
app.use(CheckboxGroup)
app.use(CouponList)
app.use(Button)
app.use(ActionBar)
app.use(ActionBarIcon)
app.use(ActionBarButton)
app.use(Card)
app.use(Checkbox)
app.use(Form)
app.use(Field)
app.use(Search)
app.use(CellGroup)
app.use(Cell)
app.use(Icon)
app.use(NavBar)
app.use(Toast)
app.use(Tab)
app.use(Tabs)
app.use(Swipe)
app.use(SwipeItem)
app.use(VanImage)
app.use(NoticeBar)
app.use(Grid)
app.use(GridItem)
app.use(Tabbar)
app.use(TabbarItem)
app.use(ActionSheet)
app.use(Dialog)
app.use(ShareSheet)
app.use(SubmitBar)

//4.注册使用pinia
app.use(createPinia().use(piniaPluginPersistedstate))

app.mount('#app')